window.addEventListener('load', function() {

				var pad = document.getElementsByClassName('track-pad')[0];
				var monitor = document.getElementsByClassName('track-monitor')[0];
				var coordinate = document.getElementsByClassName('track-coordinate')[0];
				var clist = document.getElementsByClassName('track-coordinate-list')[0];
				var reset = document.getElementsByTagName('button')[0];
				var fixSize = function() {

					monitor.width = window.innerWidth;
				};

				var context = monitor.getContext('2d');
				var cset = [];
				var isDown = false;

				window.addEventListener('resize', function() {
					fixSize();
				});
				pad.addEventListener(
					'mousedown',
					function() {
						isDown = true;
					});
				pad.addEventListener(
					'mouseup',
					function() {
						isDown = false;
					});
				pad.addEventListener('mousemove', function(e) {
					if(isDown) {
						context.strokeStyle = 'red';
						context.lineTo(e.x-'660', e.y-'90');
						context.stroke();
						coordinate.innerHTML = e.x + ':' + e.y;
						cset.push(coordinate.innerHTML);
						clist.innerHTML = cset.join(',');
					}

				});

				reset.addEventListener('click', function() {

					fixSize();
					cset = [];
					clist.innerHTML = '';
					coordinate.innerHTML = '在绿色的方块中滑动鼠标';
				});

				fixSize();

			});